package controller.view;

import model.ApplicationModel;
import view.interfaces.ApplicationView;

public class MenuController {

	private final ApplicationModel model;
	private final ApplicationView applicationView;

	public MenuController(final ApplicationModel model,
			final ApplicationView applicationView) {
		this.model = model;
		this.applicationView = applicationView;
	}

	public boolean validateNewProjectName(String text) {
		return isNotNullNotEmpty(text);
	}

	public boolean validateProjectDescription(String text) {
		return isNotNullNotEmpty(text);
	}

	public boolean validateUserName(String text) {
		return text != null && !text.trim().isEmpty();
	}

	private boolean isNotNullNotEmpty(String text) {
		return text != null && !text.trim().isEmpty();
	}

	public ApplicationView getApplicationView() {
		return applicationView;
	}
}
